import React,{useState,useEffect} from 'react'
import { Container } from './style'
import { useHistory} from 'react-router-dom'
import mingjiu1 from '../../../assets/images/mingjiu1.webp'

export default function ExhitionsItem(props) {
  
  const {message} = props
  const history = useHistory()
  const gotoExhibition = () =>{
      history.push(`/exhibition/${message.id}`)
  }
  return (
    <Container onClick={()=>{gotoExhibition()}}>
        <img src={`${message.img}`} className='item_img'/>
        <div className="title">
          {message.title}
        </div>
        <div className="adversement">
            <div className="first">
            情人节满39减5
            </div>
            <div className="second">
              情人节满199减10
            </div>
        </div>
        <div className="price">
            <div className="left">
            {message.before}
            </div>
            <div className="right">
            卷后价{message.price}
            </div>
        </div>
    </Container>
  )
}
